class AddAppConnections < ActiveRecord::Migration
  def up
    
    rename_column :videos_actors, :video_id, :app_id
    rename_column :videos_actors, :seq, :duration
    remove_column :videos_actors, :actor_id
    add_column :videos_actors, :created_at, :datetime
    rename_table :videos_actors, :app_connections
    add_index :app_connections, :app_id
    add_column :apps, :duration, :integer, default: 0
  end

  def down
  end
end
